export default {
    state: {
		openGroups:{},//此次应用请求过群资料的群id,socket每次断开连接都清空，因为我怕修改了配置没有及时更新上，细节后期优化
    },
    mutations: {
		setOpenGroups(state,{group_id,type}){
			if(state.openGroups[group_id]){
				state.openGroups[group_id][type] = true
			}else{
				state.openGroups[group_id] = {}
				state.openGroups[group_id][type] = true
			}
		},
		clearOpenGroups(state){
			state.openGroups = {}
		},
		//清除某个
		delOpenGroups(state,group_id){
			state.openGroups[group_id] && delete state.openGroups[group_id]
		},
    },
	getters: {
		isOpenGroup: (state) => (groupId,type) => {
			if(state.openGroups[groupId] && state.openGroups[groupId][type]){
				return true
			}else{
				return false
			}
		}
	},
    actions: {
		
    }
};